#include <iostream>
#include "tabtenn0.h"

int main_usett0()
{
    using std::cout;
    using std::endl;
    TabletennisPlayer player0 = TabletennisPlayer("mike", "wong", true);
    player0.Name();
    if (player0.hasTable())
    {
        cout << "has table" << endl;
    }
    else
    {
        cout << "has no table" << endl;
    }

    TabletennisPlayer player1 = TabletennisPlayer("Tim", "Cook", false);
    player1.Name();
    if (player1.hasTable())
    {
        cout << "has table" << endl;
    }
    else
    {
        cout << "has no table" << endl;
    }

    RatePlayer rate1(12, "jack", "ma", true);
    rate1.Name();
    if(rate1.hasTable()) {
        cout << " has table" << endl;
    }else{
        cout << " has no table" << endl;
    }
    rate1.showRate();

    // 使用TableTennisePlayer初始化RatePlayer
    RatePlayer rate2(24, player1);
    rate2.Name();
    if (rate2.hasTable())
    {
       cout << " has table" << endl;
    }else{
        cout << " has no table" << endl;
    }
    rate2.showRate();
    return 0;
}
